import { BaseCommand } from "./BaseCommand";
import { API_EVENT, COMMAND_STATUS } from "@/FrontProcessing/interface";
export class Cmd_Wrapper_Mesh_Create extends BaseCommand {
  event = API_EVENT.WRAPPER_MESH_CREATE;
  execute(): Promise<boolean> {
    this.system.history.push(this);
    return new Promise((resolve) => {
      this.status = COMMAND_STATUS.RUNNING;
      this.system
        .wrapper_mesh_create({ ...this.params })
        .then((result: any) => {
          this.status = COMMAND_STATUS.FINISHED;
          resolve(result);
        });
    });
  }

  undo(): boolean {
    return false;
  }
}
